Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GoogleGroupsBridge] Add new bridge for Google Groups #2451

Merged
merged 7 commits into from
Mar 26, 2022

Conversation

yamanq
Copy link
Contributor

@yamanq yamanq commented Feb 13, 2022

  • Inherits XPathAbstract
  • Handles both URL schemes for Google Groups
  • detectParameters implemented
  • Limited to first page of Google Group (30 items)

Closes #2240

@yamanq yamanq force-pushed the googlegroups branch 2 times, most recently from f3432dd to ee3d47d Compare February 13, 2022 19:01
}

protected function provideWebsiteContent() {
return defaultLinkTo(getContents($this->getSourceUrl()), self::URI);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why this is necessary is because Google groups defines the base as the root (<base href="https://groups.google.com/">) while XPathAbstract uses the source url as the base (for example https://groups.google.com/a/mozilla.org/g/announce), which leads to duplication of a/mozilla.org/g in all the relative urls used in the document if this is not used to correctly convert the relative links first.

}
}

const URL_REGEX = '/^https:\/\/groups.google.com(?:\/a\/(?<account>\S+))?(?:\/g\/(?<group>\S+))/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use # as delimiter instead of /

@github-actions
Copy link

github-actions bot commented Mar 25, 2022

🤖 Pull request artifacts

file commit
pr2451-GoogleGroups-pr-context1.html 3ba0db1

github-actions bot added a commit that referenced this pull request Mar 25, 2022
@yamanq
Copy link
Contributor Author

yamanq commented Mar 25, 2022

Thanks, fixed

@yamanq
Copy link
Contributor Author

yamanq commented Mar 25, 2022

@Bockiii Not sure what's wrong with the CI, see actual content:

image

github-actions bot added a commit that referenced this pull request Mar 25, 2022
@Bockiii
Copy link
Contributor

Bockiii commented Mar 25, 2022

Only the group is mandatory, the account is not. Thats why the tester only picks up the config for group and not for account. The tester-link shows "announce - Google Groups" while your screenshot shows "announce@mozilla.org - Google Groups".

Basically, the problem is that just by using all mandatory fields (group in this case), the bridge will not create a valid feed.

@yamanq
Copy link
Contributor Author

yamanq commented Mar 25, 2022

ah, I see. This is a quick fix since both https://groups.google.com/g/governance and https://groups.google.com/a/mozilla.org/g/governance/ exist

github-actions bot added a commit that referenced this pull request Mar 25, 2022
@Bockiii
Copy link
Contributor

Bockiii commented Mar 26, 2022

LGTM

@Bockiii Bockiii merged commit 012ecf8 into RSS-Bridge:master Mar 26, 2022
Kwbmm pushed a commit to Kwbmm/rss-bridge that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bridge request for Google Groups
3 participants